<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    /*
    alert(a);
    var a = 18;
    alert(a);

    var a;  //undefined
    alert(a);   //弹 undefined
    a = 18;     //赋值
    alert(a);   //18
    */

/*
    foo();
    function foo(){
        alert('aaa')
    }
    */

    console.log(foo)
    var foo = 10;
    console.log(foo)
    function foo(){
        alert('aa')
    }


    var foo;
    function foo(){

    }
    console.log(foo)
    foo = 10;
    console.log(foo)
</script>
</body>
</html>